"use strict";
(self["webpackChunktoknow"] = self["webpackChunktoknow"] || []).push([[59],{

/***/ 7351:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ LoadingCard2)
});

// EXTERNAL MODULE: ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
var runtime_core_esm_bundler = __webpack_require__(6252);
// EXTERNAL MODULE: ./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
var runtime_dom_esm_bundler = __webpack_require__(9963);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/components/utils/LoadingCard2.vue?vue&type=template&id=e0bc3620&scoped=true


const _withScopeId = n => (_pushScopeId("data-v-e0bc3620"),n=n(),_popScopeId(),n)
const _hoisted_1 = { class: "loading-card-wrapper" }
const _hoisted_2 = {
  class: "list",
  ref: "list"
}
const _hoisted_3 = /*#__PURE__*/(0,runtime_core_esm_bundler/* createStaticVNode */.uE)("<li data-v-e0bc3620>L</li><li data-v-e0bc3620>O</li><li data-v-e0bc3620>A</li><li data-v-e0bc3620>D</li><li data-v-e0bc3620>I</li><li data-v-e0bc3620>N</li><li data-v-e0bc3620>G</li><li data-v-e0bc3620>.</li><li data-v-e0bc3620>.</li><li data-v-e0bc3620>.</li>", 10)
const _hoisted_13 = [
  _hoisted_3
]
const _hoisted_14 = {
  class: "list1",
  ref: "list1"
}
const _hoisted_15 = /*#__PURE__*/(0,runtime_core_esm_bundler/* createStaticVNode */.uE)("<li data-v-e0bc3620>N</li><li data-v-e0bc3620>O</li><li data-v-e0bc3620>M</li><li data-v-e0bc3620>O</li><li data-v-e0bc3620>R</li><li data-v-e0bc3620>E</li><li data-v-e0bc3620>.</li><li data-v-e0bc3620>.</li><li data-v-e0bc3620>.</li><li data-v-e0bc3620>.</li>", 10)
const _hoisted_25 = [
  _hoisted_15
]

function render(_ctx, _cache, $props, $setup, $data, $options) {
  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", _hoisted_1, [
    (0,runtime_core_esm_bundler/* withDirectives */.wy)((0,runtime_core_esm_bundler/* createElementVNode */._)("ul", _hoisted_2, _hoisted_13, 512 /* NEED_PATCH */), [
      [runtime_dom_esm_bundler/* vShow */.F8, !$props.nomore]
    ]),
    (0,runtime_core_esm_bundler/* withDirectives */.wy)((0,runtime_core_esm_bundler/* createElementVNode */._)("ul", _hoisted_14, _hoisted_25, 512 /* NEED_PATCH */), [
      [runtime_dom_esm_bundler/* vShow */.F8, $props.nomore]
    ])
  ]))
}
;// CONCATENATED MODULE: ./src/components/utils/LoadingCard2.vue?vue&type=template&id=e0bc3620&scoped=true

;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/components/utils/LoadingCard2.vue?vue&type=script&lang=js

  /* harmony default export */ const LoadingCard2vue_type_script_lang_js = ({
    props: {
      nomore: {
        type: Boolean,
        default: () => false
      },
    },
    mounted() {
      let letters = this.$refs.list.children;
      for(let i = 0; i < letters.length; i++) {
        letters[i].style.animationDelay = (i * 0.1) + 's';
      }
    }
  });

;// CONCATENATED MODULE: ./src/components/utils/LoadingCard2.vue?vue&type=script&lang=js
 
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
var exportHelper = __webpack_require__(3744);
;// CONCATENATED MODULE: ./src/components/utils/LoadingCard2.vue




;


const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(LoadingCard2vue_type_script_lang_js, [['render',render],['__scopeId',"data-v-e0bc3620"]])

/* harmony default export */ const LoadingCard2 = (__exports__);

/***/ }),

/***/ 3570:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": () => (/* binding */ AuthorBaseInfo)
});

// EXTERNAL MODULE: ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
var runtime_core_esm_bundler = __webpack_require__(6252);
// EXTERNAL MODULE: ./node_modules/@vue/shared/dist/shared.esm-bundler.js
var shared_esm_bundler = __webpack_require__(3577);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/author/profile/AuthorBaseInfo.vue?vue&type=template&id=192cbd4c&scoped=true


const _withScopeId = n => (_pushScopeId("data-v-192cbd4c"),n=n(),_popScopeId(),n)
const _hoisted_1 = { class: "author-base-info-wrapper" }
const _hoisted_2 = ["src", "alt"]
const _hoisted_3 = { class: "name-sign" }
const _hoisted_4 = { class: "name" }
const _hoisted_5 = { class: "sign" }

function render(_ctx, _cache, $props, $setup, $data, $options) {
  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", _hoisted_1, [
    (0,runtime_core_esm_bundler/* createElementVNode */._)("img", {
      src: _ctx.$baseURL + $props.author.avatar,
      alt: $data.authorName
    }, null, 8 /* PROPS */, _hoisted_2),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_3, [
      (0,runtime_core_esm_bundler/* createElementVNode */._)("h2", _hoisted_4, (0,shared_esm_bundler/* toDisplayString */.zw)($props.author.username), 1 /* TEXT */),
      (0,runtime_core_esm_bundler/* createElementVNode */._)("h3", _hoisted_5, (0,shared_esm_bundler/* toDisplayString */.zw)($props.author.sign || '这里什么也没有，这是个神秘的人~'), 1 /* TEXT */)
    ]),
    (0,runtime_core_esm_bundler/* createElementVNode */._)("button", {
      class: "follow",
      onClick: _cache[0] || (_cache[0] = (...args) => ($options.follow && $options.follow(...args))),
      style: (0,shared_esm_bundler/* normalizeStyle */.j5)($options.buttonSty)
    }, (0,shared_esm_bundler/* toDisplayString */.zw)($options.ifFollowSign), 5 /* TEXT, STYLE */)
  ]))
}
;// CONCATENATED MODULE: ./src/pages/index/components/author/profile/AuthorBaseInfo.vue?vue&type=template&id=192cbd4c&scoped=true

;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/author/profile/AuthorBaseInfo.vue?vue&type=script&lang=js

  /* harmony default export */ const AuthorBaseInfovue_type_script_lang_js = ({
    props: {
      author: {
        type: Object,
        default: () => {
          return {
            username: '江户川哀',
            avatar: '',
            sign: '理想是做出最棒的国产IDE',
          }
        }
      },
    },
    data() {
      return {
        authorName: 'xxxx'
      }
    },
    computed: {
      ifFollowSign() {
        return this.author.is_follow ? '已关注' : '关注' 
      },
      buttonSty() {
        if(this.author.is_follow) return {
          color: 'var(--blue)',
          border: '1px solid var(--lightBlue)'
        }
      }
    },
    methods: {
      follow() {
        this.$emit('follow');
      }
    },
  });

;// CONCATENATED MODULE: ./src/pages/index/components/author/profile/AuthorBaseInfo.vue?vue&type=script&lang=js
 
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
var exportHelper = __webpack_require__(3744);
;// CONCATENATED MODULE: ./src/pages/index/components/author/profile/AuthorBaseInfo.vue




;


const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(AuthorBaseInfovue_type_script_lang_js, [['render',render],['__scopeId',"data-v-192cbd4c"]])

/* harmony default export */ const AuthorBaseInfo = (__exports__);

/***/ }),

/***/ 5059:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": () => (/* binding */ UserProfileFollowing)
});

// EXTERNAL MODULE: ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
var runtime_core_esm_bundler = __webpack_require__(6252);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/user/profile/UserProfileFollowing.vue?vue&type=template&id=04353e80&scoped=true


const _withScopeId = n => (_pushScopeId("data-v-04353e80"),n=n(),_popScopeId(),n)
const _hoisted_1 = { class: "user-following-wrapper" }
const _hoisted_2 = { class: "user-following-title" }

function render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_item_list = (0,runtime_core_esm_bundler/* resolveComponent */.up)("item-list")
  const _component_search_bar = (0,runtime_core_esm_bundler/* resolveComponent */.up)("search-bar")
  const _component_user_list = (0,runtime_core_esm_bundler/* resolveComponent */.up)("user-list")

  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", _hoisted_1, [
    (0,runtime_core_esm_bundler/* createElementVNode */._)("div", _hoisted_2, [
      (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_item_list, {
        items: $data.categoriesCover,
        idx: $data.categoryIdx,
        class: "category-list"
      }, null, 8 /* PROPS */, ["items", "idx"]),
      (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_search_bar, {
        class: "user-following-search",
        searchValue: $data.searchValue,
        "onUpdate:searchValue": _cache[0] || (_cache[0] = $event => (($data.searchValue) = $event))
      }, null, 8 /* PROPS */, ["searchValue"])
    ]),
    (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_user_list, {
      users: $options.filteredFollowings,
      onFetchUsers: $options.fetchFollowings,
      class: "user-list"
    }, null, 8 /* PROPS */, ["users", "onFetchUsers"])
  ]))
}
;// CONCATENATED MODULE: ./src/pages/index/components/user/profile/UserProfileFollowing.vue?vue&type=template&id=04353e80&scoped=true

// EXTERNAL MODULE: ./src/components/utils/SearchBar.vue + 3 modules
var SearchBar = __webpack_require__(2786);
// EXTERNAL MODULE: ./src/components/utils/ItemList.vue
var ItemList = __webpack_require__(8360);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/components/UserList.vue?vue&type=template&id=0616e7d1&scoped=true


const UserListvue_type_template_id_0616e7d1_scoped_true_withScopeId = n => ((0,runtime_core_esm_bundler/* pushScopeId */.dD)("data-v-0616e7d1"),n=n(),(0,runtime_core_esm_bundler/* popScopeId */.Cn)(),n)
const UserListvue_type_template_id_0616e7d1_scoped_true_hoisted_1 = /*#__PURE__*/ UserListvue_type_template_id_0616e7d1_scoped_true_withScopeId(() => /*#__PURE__*/(0,runtime_core_esm_bundler/* createElementVNode */._)("div", { class: "span" }, null, -1 /* HOISTED */))

function UserListvue_type_template_id_0616e7d1_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_author_base_info = (0,runtime_core_esm_bundler/* resolveComponent */.up)("author-base-info")
  const _component_loading_card = (0,runtime_core_esm_bundler/* resolveComponent */.up)("loading-card")

  return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("div", null, [
    (0,runtime_core_esm_bundler/* createElementVNode */._)("ul", null, [
      ((0,runtime_core_esm_bundler/* openBlock */.wg)(true), (0,runtime_core_esm_bundler/* createElementBlock */.iD)(runtime_core_esm_bundler/* Fragment */.HY, null, (0,runtime_core_esm_bundler/* renderList */.Ko)($props.users, (user) => {
        return ((0,runtime_core_esm_bundler/* openBlock */.wg)(), (0,runtime_core_esm_bundler/* createElementBlock */.iD)("li", {
          key: user.user_id
        }, [
          (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_author_base_info, {
            author: user,
            class: "abi",
            onFollow: $event => ($options.follow(user))
          }, null, 8 /* PROPS */, ["author", "onFollow"]),
          UserListvue_type_template_id_0616e7d1_scoped_true_hoisted_1
        ]))
      }), 128 /* KEYED_FRAGMENT */))
    ]),
    (0,runtime_core_esm_bundler/* createVNode */.Wm)(_component_loading_card, {
      class: "loading-card",
      ref: "loading",
      nomore: $data.nomore
    }, null, 8 /* PROPS */, ["nomore"])
  ]))
}
// EXTERNAL MODULE: ./src/pages/index/components/author/profile/AuthorBaseInfo.vue + 4 modules
var AuthorBaseInfo = __webpack_require__(3570);
// EXTERNAL MODULE: ./src/components/utils/LoadingCard2.vue + 4 modules
var LoadingCard2 = __webpack_require__(7351);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/components/UserList.vue?vue&type=script&lang=js




  /* harmony default export */ const UserListvue_type_script_lang_js = ({
    components: {
      AuthorBaseInfo: AuthorBaseInfo/* default */.Z,
      LoadingCard: LoadingCard2/* default */.Z
    },
    props: {
      users: {
        type: Array,
        default: () => []
      },
    },
    data() {
      return {
        nomore: false
      }
    },
    methods: {
      follow(user) {
        this.$post({
          name: 'follow',
          url: 'author/follow',
          data: {
            author_id: user.user_id
          },
          callback: res => {
            if(res.data.success) {
              user.is_follow = !user.is_follow;
              this.$alert(res.data.message);
              this.$store.commit('fetchUserInfos');
            } else {
              this.$alert({
                type: 'error',
                content: res.data.message
              })
            }
          }
        })
      }
    },
    mounted() {
      this.$scrollLoad({
        loadingComponent: this.$refs.loading.$el,
        callback: entries => {
          let entry = entries[0];
          if(entry.isIntersecting) {
            let bl = this.users.length;
            this.$emit('fetchUsers');
            setTimeout(() => {
              let al = this.users.length;
              if(al - bl < 10) {
                this.nomore = true;
              } else {
                this.nomore = false;
              }
            }, 1000);
          }
        }
      })
    }
  });

;// CONCATENATED MODULE: ./src/components/UserList.vue?vue&type=script&lang=js
 
// EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
var exportHelper = __webpack_require__(3744);
;// CONCATENATED MODULE: ./src/components/UserList.vue




;


const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(UserListvue_type_script_lang_js, [['render',UserListvue_type_template_id_0616e7d1_scoped_true_render],['__scopeId',"data-v-0616e7d1"]])

/* harmony default export */ const UserList = (__exports__);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[12].use[0]!./src/pages/index/components/user/profile/UserProfileFollowing.vue?vue&type=script&lang=js





/* harmony default export */ const UserProfileFollowingvue_type_script_lang_js = ({
  components: {
    SearchBar: SearchBar/* default */.Z,
    UserList: UserList,
    ItemList: ItemList/* default */.Z,
  },
  data() {
    return {
      categories: ['following'],
      categoriesCover: ['关注'],
      searching: false,
      categoryIdx: 0,
      followings: [],
      page: 0,

      searchValue: ''
    }
  },
  computed: {
    filteredFollowings() {
      return this.followings.filter(e => {
        return e.username.includes(this.searchValue);
      })
    }
  },
  watch: {
  },
  methods: {
    fetchFollowings() {
      this.$fetch({
        name: 'following users',
        method: 'POST',
        data: {
          page: this.page + 1
        },
        url: '/user/following',
        callback: res => {
          if(res.data.success) {
            this.page++;
            this.followings = this.followings.concat(res.data.object);
          } else {
            this.$alert({
              type: 'error',
              content: '获取关注列表失败'
            })
          }
        }
      })
    }
  },
});

;// CONCATENATED MODULE: ./src/pages/index/components/user/profile/UserProfileFollowing.vue?vue&type=script&lang=js
 
;// CONCATENATED MODULE: ./src/pages/index/components/user/profile/UserProfileFollowing.vue




;


const UserProfileFollowing_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(UserProfileFollowingvue_type_script_lang_js, [['render',render],['__scopeId',"data-v-04353e80"]])

/* harmony default export */ const UserProfileFollowing = (UserProfileFollowing_exports_);

/***/ })

}]);